home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 May
/
Macworld (1999-05).dmg
/
Shareware World
/
Info
/
For Developers
/
SerialPort OSAX 1.1
/
Sample Scripts
/
Data Logger
/
README
< prev
Wrap
Text File
|
1997-03-24
|
4KB
|
114 lines
K2000_data_logger:
©1997 Dr. Kirk A. Rogers
This script uses Standard Commands for Programmable Interfaces (SCPI) to
communicate to devices supporting this standard, i.e. the Keithley 2000 Digital
Multimeter. This script can be distributed freely as long as this readme is
included.
Requirements:
• Serial Port Commands and Bits&Bytes Commands OSAXen by Blake Ward
• WaitTicks OSAX by Joseph Laffey
• Any Macintosh with a Serial port called "Modem
Port" (Powerbooks currently not supported)
All of the above OSAXen should be available from <http://applescript.apple.com>
or your favorite info-mac mirror site.
Other instruments this script might work with:
PREMA multimeters, other Keithley multimeters, American Reliance programmable DC
power supplies, Wavetech Waveform synthesizers, Techtronics Multiplexers, etc.
Using This Script:
Connect the Macintosh to the RS-232 connector with a cable wired straight
through. Do not use s "null Modem" or "Crossover" cable. I would recommend
checking the pinouts and using a terminal emulator to make sure communication is
OK before collecting data. If you do use a terminal emulator, make sure "Remote
Echo" is off.
The pinout on the device should be like below:
Pin # Description
1 no connection
2 TXD, transmit data
3 RXD, recieve data
4 no connection
5 GND, signal ground
6 no connection
7 CTS, clear to send
8 RTS, ready to send
9 no connection
Note: pins 7 and 8 are not used for SCPI Communication
Furthermore, the device should be set to 9600 baud, no parity, 8 data bits, 1
stop bit and <LF> as the end transmission character.
The pins on the mini DIN-8 Macintosh port are:
8 7 6
5 4 3
2 1
Pin # Description
1 RTS, ready to send (output handshake)
2 CTS, clear to send (input handshake)
3 TXD, transmit data
4 GND, signal ground
5 RXD, recieve data
6 TXD, transmit data
7 not connected
8 RXD, recieve data
Note: gound pin 8 for RS-232
See Technote HW 10 or search apple's TIL <http://til.info.apple.com/til/til.html>
for more information)
Version History
v0.7
checks for more errors
displays data to the screen via the Scriptable Text Editor
writes data only once per data read cycle (instead of 3x)
forces taking of at least 1 data point
takes data every 3 sec or so on an SE/30
added routine to strip termination character
v0.6
checks for some errors
implemented <LF> as end of transmission to aid communication
data not formatted well, need to strip linefeeds
tested on a Powermac 7100, A MacII SI and an SE/30
takes data as fast as every 18 sec on SE/30
still doesn't display data to the screen while reading
v0.5
first version, syntax checked but did not collect data
About the Author/the Script
The author is currently a postdoctoral researcher in Material Science and
Engineering at the Ohio State University. His current research interests are in
composite processing, microstructural evolution, thermochemistry, etc. Other
interests include bicycling, beagles ( especially Molly and Maggie) and of course
the Macintosh. He is currently the listmaster for the Macs in Science and
Engineering mailing list, a list he founded. For more information, please see
<http://mse59.eng.ohio-state.edu/MacSciEng/>.
This script was initially writted for a collegue in order to allocate a Mac SE/30
to measure the Partial Temperature Coefficient of Resistance (PTCR) effect in
Titinate Ceramics. Please feel free to contact me at <rogers.146@osu.edu> with
suggestions, questions or comments.
©1997 Dr. Kirk A. Rogers